import request from '@/config/axios'

// 用户关注 VO
export interface UserFocusVO {
  id: number // 编号
  userId: number // 用户编号
  focusId: number // 对方编号
  userName: string // 对方编号
  focusName: string // 对方编号
}

// 用户关注 API
export const UserFocusApi = {
  // 查询用户关注分页
  getUserFocusPage: async (params: any) => {
    return await request.get({ url: `/blog/user-focus/page`, params })
  },

  // 查询用户关注详情
  getUserFocus: async (id: number) => {
    return await request.get({ url: `/blog/user-focus/get?id=` + id })
  },

  // 新增用户关注
  createUserFocus: async (data: UserFocusVO) => {
    return await request.post({ url: `/blog/user-focus/create`, data })
  },

  // 修改用户关注
  updateUserFocus: async (data: UserFocusVO) => {
    return await request.put({ url: `/blog/user-focus/update`, data })
  },

  // 删除用户关注
  deleteUserFocus: async (id: number) => {
    return await request.delete({ url: `/blog/user-focus/delete?id=` + id })
  },

  // 导出用户关注 Excel
  exportUserFocus: async (params) => {
    return await request.download({ url: `/blog/user-focus/export-excel`, params })
  },
}
